<template>
  <div id="app">
    <!-- 路由匹配到的组件将显示在这里 -->
    <!--    <router-view> </router-view>-->

    <router-view v-if="isRouterAlive"/>
    <!-- 底部tabbar 组件 -->
    <AppTabBar v-show="$route.meta.isShowTabbar"></AppTabBar>

  </div>
</template>

<script>
import AppTabBar from "@/components/AppTabBar";

export default {
  name: 'App',
  components: {
    AppTabBar,
  },
  provide() {
    return {
      reload: this.reload
    }
  },
  data() {
    return {
      isRouterAlive: true
    }
  },
  methods: {
    reload() {
      this.isRouterAlive = false
      this.$nextTick(function () {
        this.isRouterAlive = true
      })
    }
  }
}
</script>
<style lang='less' scoped>

</style>
